<template>
  <div class="article-list">
    <div class="container">
      <div class="article-wrap">
        <div class="article-item" v-for="item in list" :key="item.id">
          <h3 class="article-title">
            <NuxtLink :to="'/article/' + item.id">{{ item.title }}</NuxtLink>
          </h3>
          <div class="article-info">
            <span class="article-date">{{ item.createTime | dateFormat }}</span>
            <div class="cate-list inline" v-for="cateItem in item.categories" :key="cateItem.id">
              <NuxtLink :to="'/cate/' + cateItem.id">{{ cateItem.name }}</NuxtLink>
            </div>
            <div class="tag-list inline" v-for="tagItem in item.tags" :key="tagItem.id">
              <span></span>
              <NuxtLink :to="'/tag/' + tagItem.id">{{ tagItem.name }}</NuxtLink>
            </div>
          </div>
          <p class="article-summary">
            {{ item.summary }}
          </p>
          <span class="article-more">
            <NuxtLink :to="'/article/' + item.id">查看更多</NuxtLink>
          </span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ['list'],
};
</script>
